Data Model Example

The following model of a database was constructed for a hypothetical video store:

Example of a data model

The data model of the video store, with definitions of the objects presented on it, makes the following assertions:

  • A MOVIE is in stock as one or more MOVIE COPYs. Information recorded about a MOVIE includes its name, a rating, and a rental rate. The general condition of each MOVIE COPY is recorded.
  • The store's CUSTOMERs rent the MOVIE COPYs. A MOVIE RENTAL RECORD records the information about the rental of a MOVIE COPY by a CUSTOMER. The same MOVIE COPY can, over time, be rented to many CUSTOMERs.
  • Each MOVIE RENTAL RECORD also records a due date for the movie and a status indicating whether it is overdue. Depending on a CUSTOMER's previous relationship with the store, a CUSTOMER is assigned a credit status code that indicates whether the store accepts checks or credit cards for payment, or accepts only cash.
  • The store's EMPLOYEEs are involved with many MOVIE RENTAL RECORDs, as specified by an involvement type. There must be at least one EMPLOYEE involved with each record. Because the same EMPLOYEE might be involved with the same rental record several times on the same day, involvements are distinguished with a timestamp.
  • An overdue charge is sometimes collected on a rental of a MOVIE COPY. OVERDUE NOTICEs remind a CUSTOMER to return a movie. An EMPLOYEE is sometimes listed on an OVERDUE NOTICE.
  • The store keeps salary and address information about each EMPLOYEE. The store may have to look up CUSTOMERs, EMPLOYEEs, and MOVIEs by name, rather than by number.

The data model example is relatively small, but it says a lot about the video rental store. You can get an idea of what a database for the business can look like, and a good picture of the business. Several different types of graphical objects are presented in this diagram. The entities, attributes, and relationships, with the other symbols, describe our business rules. The following sections describe what the different graphical objects mean, and how to use erwin� Data Modeler to create your own logical and physical data models.